package com.uplooking.Proxy;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.stereotype.Service;

@Service("RoundAdv")
public class RoundAdv implements MethodInterceptor{

	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		//执行原来逻辑之前
		System.out.println("做好售前服务");
		
		
		//执行target 原来的逻辑
		Object obj=invocation.proceed();
		
		//执行原来逻辑之后
		System.out.println("拿利润分成");
		
		return obj;
	}

}
